<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>Document</title>
		<style type="text/css">
			body {
				padding: 0;
				background-color: rgb(30, 5, 141);
			}
		</style>
	</head>
	<body>
		<!-- <div id="cav"></div> -->
	</body>
	<script src="./js/three.min.js"></script>
	<script src="./js/OrbitControls.js"></script>
	<script src="./js/GLTFLoader.js" type="text/javascript" charset="utf-8"></script>
	<script src="./js/Raycaster.js" type="module"></script>
	<script src="./js/index.js"></script>
	<script>
		var json_str = '';
		json_str = '[';
		json_str +=
			'{\"name\":\"001\",\"x\":0,\"y\":0,\"children\":[{\"path\":\"./models/pipe_D400_L12_N1.glb\",\"count\":10},{\"path\":\"./models/gd.glb\",\"count\":10}]},';
		json_str += '{\"name\":\"002\",\"x\":0,\"y\":3,\"children\":[{\"path\":\"./models/gd.glb\",\"count\":10}]},';
		json_str += '{\"name\":\"003\",\"x\":0,\"y\":6,\"children\":[{\"path\":\"./models/pipe_D400_L12_N1.glb\",\"count\":10}]},';
		json_str += '{\"name\":\"004\",\"x\":0,\"y\":9,\"children\":[{\"path\":\"./models/gd.glb\",\"count\":10}]},';

		json_str += '{\"name\":\"005\",\"x\":14,\"y\":0,\"children\":[{\"path\":\"./models/pipe_D400_L12_N1.glb\",\"count\":10}]},';
		json_str += '{\"name\":\"006\",\"x\":14,\"y\":3,\"children\":[{\"path\":\"./models/pipe_D400_L12_N1.glb\",\"count\":10}]},';
		json_str += '{\"name\":\"007\",\"x\":14,\"y\":6,\"children\":[{\"path\":\"./models/pipe_D400_L12_N1.glb\",\"count\":10}]},';
		json_str += '{\"name\":\"008\",\"x\":14,\"y\":9,\"children\":[{\"path\":\"./models/pipe_D400_L12_N1.glb\",\"count\":10}]},';
		json_str += ']';

		var json_list = eval('(' + json_str + ')');
		for (var i = 0; i < json_list.length; i++) {
			var box = json_list[i];
			AddBox(box.x, box.y);
			var z = 0.2;
			for (var j = 0; j < box.children.length; j++) {
				var gd = box.children[j];
				z = AddModels(gd.path, box.x + 0.5, z, box.y - 0.5, 2.8, 0.4, gd.count)
			}
		}



		render();
	</script>
</html>
